package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.UDFormApplication;
import com.ruoyi.system.api.factory.RemoteUDFromFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author cheng
 * @create 2021-09-06-16:23
 */
@FeignClient(contextId = "remoteFromService", value = ServiceNameConstants.UDFORM_SERVICE, fallbackFactory = RemoteUDFromFallbackFactory.class)
public interface RemoteUDFromService
{
    @PostMapping(value = "/application/optionselect")
    public R<List<Map<String,Object>>> applicationList(UDFormApplication UDFormApplication);

    @GetMapping(value = "/page/optionselect/{appId}")
    public R<List<Map<String,Object>>> webPageList(@PathVariable("appId") String appId);

    @GetMapping(value = "/pageValue/find")
    public R<Map<String,Object>> findById(@RequestParam("id") String id,@RequestParam("table") String table);
}
